import React, { Component } from 'react'
import { View, Image } from '@tarojs/components'
import './host.less'
import ten from '../imges/1.png'
import two from '../imges/2.png'
import treen from '../imges/3.png'
import frou from '../imges/4.png'
import five from '../imges/5.png'
import seven from '../imges/6.png'

class Host extends Component{
    constructor(props){
        super(props),
        this.state={
            
        }
    }
    
    /*改变热点数据类型*/
    changeData(dataType) {
        console.log(dataType)
        this.props.parent.beforeReloadList(dataType,1);
      }
    render(){
        return(
            <View className='at-row at-row--wrap host-header'>
                <View className='at-col at-col-4 host-list' onClick={this.changeData.bind(this,'1')}>
                    <Image className='hot-spot-icon-list-image' src={ten}></Image>
                    <View className='at-article__p'>节气养生</View>
                </View>
                <View className='at-col at-col-4 host-list' onClick={this.changeData.bind(this,'2')}>
                    <Image className='hot-spot-icon-list-image' src={two}></Image>
                    <View className='at-article__p'>自我保健</View>
                </View>
                <View className='at-col at-col-4 host-list' onClick={this.changeData.bind(this,'3')}>
                    <Image className='hot-spot-icon-list-image' src={treen}></Image>
                    <View className='at-article__p'>药膳食疗</View>
                </View>
                <View className='at-col at-col-4 host-list' onClick={this.changeData.bind(this,'4')}>
                    <Image className='hot-spot-icon-list-image' src={frou}></Image>
                    <View className='at-article__p'>中药常识</View>
                </View >
                <View className='at-col at-col-4 host-list' onClick={this.changeData.bind(this,'5')}>
                    <Image className='hot-spot-icon-list-image' src={five}></Image>
                    <View className='at-article__p'>中医文化</View>
                </View>
                <View className='at-col at-col-4 host-list' onClick={this.changeData.bind(this,'6')}>
                    <Image className='hot-spot-icon-list-image' src={seven}></Image>
                    <View className='at-article__p'>儿科健康</View>
                </View>
            </View>
        )
    }
}
Host.defaultProps = {
    parent: null
};
export default Host;